
import service from "@/utils/request";
import { ElMessage } from "element-plus";

function getAbout() {
  return service({
    url: "/about",
    method: "get",
  });
}

export async function apiGetAbout(): Promise<string> {
  const rsp: any = await getAbout();

  if (true == rsp.success) {
    if (rsp.message && rsp.message != "") {
      ElMessage.success(rsp.message)
    }

    return rsp.data as string;
  } else {
    ElMessage({
      message: rsp.message != "" ? rsp.message : "内容获取失败",
      type: "error",
      center: true,
    });

    return '';
  }
}
